/**
 * 店铺相关API
 */

import {
	request,
	Method
} from '@/utils/request.js';
/**
 * 创建商品
 * @param params
 */
export function createGoods(params) {
	return request({
		url: '/api/MerchantManage.goods/create',
		method: Method.POST,
		params,
	});
}

/**
 * 查询商品列表
 * @param params
 */
export function storeGoodsList(params) {
	return request({
		url: '/api/MerchantManage.goods/list',
		method: Method.GET,
		params,
	});
}

/**
 * 获取商品详情
 * @param params
 */
export function storeGoodsDetails(params) {
	return request({
		url: '/api/MerchantManage.goods/detail',
		method: Method.GET,
		params,
	});
}


/**
 * 管理SKU数据
 * @param params
 */
export function manageSkuData(params) {
	return request({
		url: '/api/MerchantManage.goods/manageSkuData',
		method: Method.POST,
		params,
	});
}

/**
 * 修改商品
 * @param params
 */
export function goodsUpdate(params) {
	return request({
		url: '/api/MerchantManage.goods/update',
		method: Method.POST,
		params,
	});
}

/**
 * 订单列表
 * @param params
 */
export function getOrderList(params) {
	return request({
		url: '/api/MerchantManage.order/list',
		method: Method.GET,
		params,
	});
}

/**
 * 订单详情
 * @param params
 */
export function getOrderDetail(params) {
	return request({
		url: '/api/MerchantManage.order/detail',
		method: Method.GET,
		params,
	});
}

/**
 * 自提订单确认出货
 * @param params
 */
export function confirmPickup(params) {
	return request({
		url: '/api/MerchantManage.order/confirmPickup',
		method: Method.POST,
		params,
	});
}


/**
 * 物流订单发货
 * @param params
 */
export function orderShip(params) {
	return request({
		url: '/api/MerchantManage.order/ship',
		method: Method.POST,
		params,
	});
}

/**
 * 确认已归还
 * @param params
 */
export function confirmReturn(params) {
	return request({
		url: '/api/MerchantManage.order/confirmReturn',
		method: Method.POST,
		params,
	});
}

/**
 * 获取商户流水列表
 * @param params
 */
export function moneyLogList(params) {
	return request({
		url: '/api/MerchantManage.merchant/moneyLogList',
		method: Method.GET,
		params,
	});
}

/**
 * 获取商户流水列表
 * @param params
 */
export function sendUrgeBackSms(params) {
	return request({
		url: '/api/MerchantManage.order/sendUrgeBackSms',
		method: Method.POST,
		params,
	});
}

/**
 * 提交提现申请
 * @param params
 */
export function withdrawSubmit(params) {
	return request({
		url: '/api/MerchantManage.order/withdrawSubmit',
		method: Method.POST,
		params,
	});
}


/**
 * 提现订单列表
 * @param params
 */
export function withdrawList(params) {
	return request({
		url: '/api/MerchantManage.order/withdrawList',
		method: Method.GET,
		params,
	});
}